package com.fastbee.api.utils;

import java.util.HashMap;
import java.util.Map;

public class Constants {
    //服务器IP
    public static final String ip = "106.14.186.44";
    //服务器端口：默认9999
    public static final String port = "9999";
    //登录类型：user:用户,car:车辆或人员
    public static final String userType = "user";
    //会话ID：有效时间30分钟（登录时可为空）由登录接口返回
    public static final String sessionId = "ZmU5NzVlYTJkNzExJXlzX2FkbWluJWludGVyZmFjZSV1c2VyJXpoX0NO";
    //用户账号
    public static final String userId = "LL";
    //登录方式：ie/cs/wx/android/iphone/ipad/interface
    public static final String loginWay = "interface";
    //登录语言：默认简体中文
    public static final String loginLang = "zh_CN";
    //车辆ID：演示06
    public static final String carId="105237";

    private static final String HTTP="http://";
    private static final String SEMICOLON=":";
    private static final String CLASH="/";
    private Constants() {
        throw new IllegalStateException("can not init from this way");
    }

    //基础网址
    public String getBaseUrl(){
        StringBuilder mBuilder = new StringBuilder();
        mBuilder.setLength(0);
        return mBuilder.append(HTTP).append(ip).append(SEMICOLON).append(port).append("/gps-web/api/").toString();
    }

    public static  Map<String, Object> getComParams() {
        Map<String, Object> params = new HashMap<>();
        params.put("loginType", userType);
        params.put("loginWay", loginWay);
        params.put("loginLang", loginLang);
        params.put("sessionId", sessionId);
        return params;
    }

}
